package com.polaris.live.dialog

import android.content.Context
import com.lxj.xpopup.core.CenterPopupView
import com.polaris.live.R
import com.polaris.live.common.ext.setOnSingleClickListener
import com.polaris.live.databinding.DialogPwsErrorInputTimeBinding
import com.polaris.live.translation.R.string

/**
 * 密码错误重试次数
 *
 * @author Created by 长空 on 2023/11/09/004 10:49
 */
class PwsErrorInputTimeDialog(context: Context, private val remainTime: Int) : CenterPopupView(context) {

    private lateinit var mBinding: DialogPwsErrorInputTimeBinding
    override fun getImplLayoutId(): Int {
        return R.layout.dialog_pws_error_input_time
    }

    override fun onCreate() {
        super.onCreate()
        mBinding = DialogPwsErrorInputTimeBinding.bind(popupImplView)
        mBinding.tvSure.setOnSingleClickListener {
            dismiss()
        }
        mBinding.tvTitle.text = String.format(context.getString(string.pws_error), remainTime)
    }

}